package security;

import entity.User;
import entity.UserRole;

public class AuthorizationManager {
    
    public boolean isAuthorized(User user, UserRole requiredRole) {
        boolean isAuthorized = false;
        
        if (user != null) {
            if (user.getUserRole().equals(requiredRole)) {
                isAuthorized = true;
            }
        }
        return isAuthorized;
    }
    
}
